{extend name='admin@main'}

{block name="button"}


{/block}

{block name="content"}
<div class="think-box-shadow">
    {include file='wh_supplies/index_search'}
    <table class="layui-table" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
            </th>
            <th class='text-left nowrap'>仓库编码</th>
            <th class='text-left nowrap'>仓库名称</th>
            <th class='text-left nowrap'>平台</th>
            <th class='text-left nowrap'>接仓类型</th>
            <th class='text-center nowrap'>城市级别</th>
            <th class='text-left nowrap'>添加时间</th>
            <th class='text-left nowrap'></th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr data-dbclick>
            <td class='list-table-check-td think-checkbox'>
                <label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
            </td>
            <td class='text-left nowrap'>{$vo.number|default=''}</td>
            <td class='text-left nowrap'>
                {$vo.name|default=''}
            </td>
            <td class='text-left nowrap'>{$vo.platform_name|default='-'}</td>
            <td class='text-left nowrap'>{$vo.type|default='-'}</td>
            <td class='text-center nowrap'>
                {eq name='vo.city_level' value='0'}<span class="layui-badge layui-bg-blue">L1城市</span>{/eq}
                {eq name='vo.city_level' value='1'}<span class="layui-badge layui-bg-orange">L2城市</span>{/eq}
                {eq name='vo.city_level' value='2'}<span class="layui-badge layui-bg-green">L3城市</span>{/eq}
            </td>
            <td class='text-left nowrap'>
                {$vo.create_at|format_datetime}
            </td>
            <td class='text-left nowrap'>

                {if auth("wh_product")}
                <a data-dbclick class="layui-btn layui-btn-sm layui-btn-normal" data-open='{:url("wh_product/index")}?ware_house_id={$vo.id}&back=1'>商品列表</a>
                {/if}
                {if auth("wh_purchase")}
                <a data-dbclick class="layui-btn layui-btn-sm layui-btn-green" data-open='{:url("wh_purchase/index")}?ware_house_id={$vo.id}&back=1'>采购订单</a>
                {/if}
                {if auth("wh_inventory")}
                <a data-dbclick class="layui-btn layui-btn-sm layui-btn-warm" data-open='{:url("wh_inventory/index")}?ware_house_id={$vo.id}&back=1'>物资盘点</a>
                {/if}
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>

    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

</div>

{/block}
